Ext.define('Gigi.model.User', {
	extend : 'Ext.data.Model',

	fields : [ 'username', {
		name : 'accountNonExpired',
		type : 'boolean'
	}, {
		name : 'accountNonLocked',
		type : 'boolean'
	}, {
		name : 'credentialsNonExpired',
		type : 'boolean'
	}, {
		name : 'enabled',
		type : 'boolean'
	}, 'email' ],

	idProperty : 'username',

	proxy: {
		type: 'rest',
		url : contextPath+'sec/user',
		reader: {
			type: 'json',
			root: 'data',
			totalProperty: 'totalCount',
			idProperty: 'username'
		},
		simpleSortMode: true
	}
});